import defaultSettings from '@/settings'
import i18n from '@/lang'

const title = defaultSettings.title || '金丹科技'

export default function getPageTitle(key) {
  // const hasKey = i18n.te(`route.${key}`)
  // console.log(hasKey)
  // if (hasKey) {
  //   const pageName = i18n.t(`route.${key}`)
  //   return `${pageName} - ${title}`
  // }
  // return `${title}`
  if(key){
    return `${key} - ${title}`
  }
  return `${title}`
}
